<!DOCTYPE html>
<html>
<%@page import="com.java.model.MusicInfo"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.java.bean.MusicBean"%>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="./icon/ico.ico">
<link href="./css/bootstrap.min.css" rel="stylesheet">
<link href="./css/signin.css" rel="stylesheet">
<script src="./js/bootstrap.min.js"></script>
<%@page contentType="text/html; charset=UTF-8" language="java"%>
<head>
<body
	style="padding-top: 0; padding-bottom: 0; background-color: #ffffff;">
	<nav class="navbar navbar-default" role="navigation"
		style="margin-bottom: 0">
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="index.jsp" style="padding: 10px"><img
					alt="" src="./icon/icon.ico" height="35px"
					style="margin-left: 0; margin-bottom: 5"></a>
			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse"
				id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					<li><a href="index.jsp?tag=1">音乐列表</a></li>
					<li><a href="index.jsp?tag=2">歌曲上传</a></li>
					<li><a href="index.jsp?tag=4">榜单</a></li>
				</ul>
				<form class="navbar-form navbar-left" role="search"
					action="SearchAction">
					<div class="form-group">
						<input type="text" class="form-control" placeholder="Search"
							name="keyword">
					</div>
					<button type="submit" class="btn btn-default">查找</button>
				</form>
				<ul class="nav navbar-nav navbar-right">
					<%
						String username = null;
						Cookie[] cookies = request.getCookies();
						for (Cookie cookie : cookies) {
							if (cookie.getName().equals("username")) {
								username = cookie.getValue();
							}
						}
						if (username != null) {
					%>
					<li><a href="index.jsp?tag=3"><%=username%></a></li>
					<li><a href="LogoutAction">注销</a></li>
					<%
						} else {
					%>
					<li><a href="register.jsp">注册</a></li>
					<li><a href="login.jsp">登陆</a></li>
					<%
						}
					%>
				</ul>
			</div>
			<!-- /.navbar-collapse -->
		</div>
		<!-- /.container-fluid -->
	</nav>
</head>

<%
	String tag = "1";
	if (request.getParameter("tag") != null) {
		tag = (String) request.getParameter("tag");
		System.out.println(tag);
	}
%>

<div id="content" width="100%" height="700px">
	<%
		if (tag.equals("1")) {
	%>
	<iframe src="musiclist.jsp" width="100%" height="600px" scrolling="no"></iframe>
	<%
		} else if (tag.equals("2")) {
	%>
	<iframe src="fileUp.jsp" width="100%" height="600px" scrolling="no"></iframe>
	<%
		} else if (tag.equals("3")) {
	%>
	<iframe src="user.jsp" width="100%" height="600px" scrolling="no"></iframe>
	<%
		} else if (tag.equals("4")) {
	%>
	<iframe src="top.jsp" width="100%" height="600px" scrolling="no"></iframe>
	<%
		} else if (tag.equals("5")) {
	%>
	<iframe src="search.jsp" width="100%" height="600px" scrolling="no"></iframe>
	<%
		}
	%>

</div>

</body>
<%@ taglib uri="/WEB-INF/simple.tld" prefix="tag"%>
<p style="text-align: center; color: #A79999">
	<tag:simple></tag:simple>
</p>

</html>
